<template>
  <a-modal v-model:open="open" width="37.5vw" :footer="null">
    <div class="img-preview">
      <img :src="url" alt="" />
    </div>
  </a-modal>
</template>

<script setup lang="ts">
import { computed, ref } from "vue";

const props = defineProps<{
  url: string;
}>();

const open = ref(false);

const openModal = () => {
  open.value = true;
};

defineExpose({
  open: openModal,
});
</script>
<style scoped lang="less">
.img-preview {
  margin-top: 30px;
  img {
    width: 100%;
  }
}
</style>
